package com.pengtu.entity.business;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.pengtu.entity.IdEntity;
import com.pengtu.entity.app.User;
import com.pengtu.entity.project.ProjectInfo;

/**
 * 工程监督人员
 * @author liuyang
 *
 */
@Entity
@Table(name = "T_Q_PROJ_SUPERVISER")
public class Superviser extends IdEntity {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private ProjectInfo projectInfo;	//工程
	private User user;					//监督人员
	private Date startDate;				//监督开始时间
	private Date endDate;				//监督结束时间
	private String duty;				//人员职责
	private String phone;				//联系电话
	private String remark;				//备注
	private String groupName;//所属组别
	
	@ManyToOne(targetEntity=ProjectInfo.class,fetch=FetchType.LAZY)
	@JoinColumn(name="PID")
	public ProjectInfo getProjectInfo() {
		return projectInfo;
	}
	public void setProjectInfo(ProjectInfo projectInfo) {
		this.projectInfo = projectInfo;
	}
	
	@ManyToOne(targetEntity=User.class,fetch=FetchType.LAZY)
	@JoinColumn(name="OFFICER")
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	
	@Column(name="STARTDATE")
	public Date getStartDate() {
		return startDate;
	}
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	
	@Column(name="ENDDATE")
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	@Column(name="DUTY")
	public String getDuty() {
		return duty;
	}
	public void setDuty(String duty) {
		this.duty = duty;
	}
	
	@Column(name="PHONE")
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	@Column(name="REMARK")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	/**
	 * groupName
	 *
	 * @return  the groupName
	 * @since   1.0.0
	 */
	@Column(name="GROUPNAME")
	public String getGroupName() {
		return groupName;
	}
	/**
	 * @param groupName the groupName to set
	 */
	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

}
